# jmouriz@gmail.com
package packet;

use strict;
use warnings;

sub new
{
  my %this;

  $this{'description'} = '';
  $this{'head'}        = '';
  $this{'data'}        = '';

  bless \%this, shift;

  return \%this;
}

sub ready
{
  my $this = shift;

  return $this->get_description;

  return ($this->get_head ne '' and
          $this->get_data ne '' and
          $this->get_description ne '');
}

sub get_description
{
  return shift->{'description'};
}

sub set_description
{
  shift->{'description'} .= shift;
}

sub get_head
{
  return shift->{'head'};
}

sub set_head
{
  shift->{'head'} .= shift;
}

sub get_data
{
  return shift->{'data'};
}

sub set_data
{
  shift->{'data'} .= shift;
}

1;
